package com.ruoyi.driver.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.DriverTrainingCoursesMapper;
import com.ruoyi.driver.domain.DriverTrainingCourses;
import com.ruoyi.driver.service.IDriverTrainingCoursesService;

/**
 * 培训课程Service业务层处理
 * 
 * @author yyj
 * @date 2025-08-17
 */
@Service
public class DriverTrainingCoursesServiceImpl implements IDriverTrainingCoursesService 
{
    @Autowired
    private DriverTrainingCoursesMapper driverTrainingCoursesMapper;

    /**
     * 查询培训课程
     * 
     * @param id 培训课程主键
     * @return 培训课程
     */
    @Override
    public DriverTrainingCourses selectDriverTrainingCoursesById(Long id)
    {
        return driverTrainingCoursesMapper.selectDriverTrainingCoursesById(id);
    }

    /**
     * 查询培训课程列表
     * 
     * @param driverTrainingCourses 培训课程
     * @return 培训课程
     */
    @Override
    public List<DriverTrainingCourses> selectDriverTrainingCoursesList(DriverTrainingCourses driverTrainingCourses)
    {
        return driverTrainingCoursesMapper.selectDriverTrainingCoursesList(driverTrainingCourses);
    }

    /**
     * 新增培训课程
     * 
     * @param driverTrainingCourses 培训课程
     * @return 结果
     */
    @Override
    public int insertDriverTrainingCourses(DriverTrainingCourses driverTrainingCourses)
    {
        return driverTrainingCoursesMapper.insertDriverTrainingCourses(driverTrainingCourses);
    }

    /**
     * 修改培训课程
     * 
     * @param driverTrainingCourses 培训课程
     * @return 结果
     */
    @Override
    public int updateDriverTrainingCourses(DriverTrainingCourses driverTrainingCourses)
    {
        return driverTrainingCoursesMapper.updateDriverTrainingCourses(driverTrainingCourses);
    }

    /**
     * 批量删除培训课程
     * 
     * @param ids 需要删除的培训课程主键
     * @return 结果
     */
    @Override
    public int deleteDriverTrainingCoursesByIds(Long[] ids)
    {
        return driverTrainingCoursesMapper.deleteDriverTrainingCoursesByIds(ids);
    }

    /**
     * 删除培训课程信息
     * 
     * @param id 培训课程主键
     * @return 结果
     */
    @Override
    public int deleteDriverTrainingCoursesById(Long id)
    {
        return driverTrainingCoursesMapper.deleteDriverTrainingCoursesById(id);
    }
}
